PostgresUserRepository

class PostgresUserRepository(db: Database = DBConnection.getDatabaseObject()) : UserRepository

Implementation of the UserRepository interface using PostgreSQL as the database.

Constructors

Link copied to clipboard
constructor(db: Database = DBConnection.getDatabaseObject())

Functions

Link copied to clipboard
open override fun deleteById(userId: String): Boolean

Deletes a user by their ID.

Link copied to clipboard
open override fun findAll(): List<User>

Finds all users in the database.

Link copied to clipboard
open override fun findByEmail(email: String): User?

Finds a user by their email.

Link copied to clipboard
open override fun findById(userId: String): User?

Finds a user by their ID.

Link copied to clipboard
open override fun save(user: User): User

Saves a user to the database.

Link copied to clipboard
open override fun update(user: User): User?

Updates a user in the database.